package com.lening.security.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.security.dto.PlanDTO;
import com.lening.security.po.PlanPO;
import com.lening.security.service.IPlanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 赵子豪
 * @date 2024年06月04日 09时07分41秒
 * 巡检计划
 */
@Slf4j
@RestController
@RequestMapping("plan")
public class PlanController extends BaseController<PlanPO, PlanDTO, IPlanService> {
    @Autowired
    private IPlanService iPlanService;
    //分页
    @GetMapping("planspage")
    public Page<PlanDTO> planspage(PlanDTO planDTO){
        Page<PlanDTO> planspage = iPlanService.planspage(planDTO);
        return planspage;
    }


    //记录
    @GetMapping("planssrecordpage")
    public Page<PlanDTO> planssrecordpage(PlanDTO planDTO) {
        Page<PlanDTO> planssrecordpage = iPlanService.planssrecordpage(planDTO);
        return planssrecordpage;
    }
}